<script>
	import myrequest from "@/untils/request.js"
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		onLaunch() {
			myrequest.autologin().then((r)=>{   //自动登录
				this.$store.commit("SET_USER",r.user.data.data)  //全局保存用户
				this.$store.commit("SET_TOKEN",r.token)  
				this.$store.commit("SET_ISLOGIN",true)  
			}).then(()=>{
				uni.$emit("loginok")
			})
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
